#include <iostream>
#include <stdexcept>
#include <QApplication>
#include "GUI/MainWindow.hpp"
#include "Options/Options.hpp"
#include "Pizzeria/Reception.hpp"

int main(int argc, char *argv[]) {
  try {
    Options::GetInstance().ParseParameters(argc, argv);
  }
  catch (std::invalid_argument &e) {
    std::cerr << "Invalid argument: " << e.what() << std::endl;
    return 1;
  }

  QApplication app(argc, argv);
  pizzeria::Reception reception;

  gui::MainWindow mainWindow(reception);
  mainWindow.show();

  return app.exec();
}
